package site.immonkey.classscan;

import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class ScanPathConfig {
    private final static List<String> SCAN_CLASS_PATH = new ArrayList<String>();

    static {
        /*
        SCAN_CLASS_PATH.addAll(Arrays.asList(System.getProperty("java.class.path").split(";")));
        */
        URL rootResource = ScanPathConfig.class.getResource("/");
        String rootPath = rootResource.getFile();
        SCAN_CLASS_PATH.add(rootPath);
    }

    public static void addScanClassPath(String path) {
        SCAN_CLASS_PATH.add(path);
    }

    public static List<String> getScanClassPath() {
        return SCAN_CLASS_PATH;
    }
    
    public static void main(String[] args) {
        System.out.println(SCAN_CLASS_PATH);
    }
}
